PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

getting error whoile installing composer

Solved
sinhcoms-llc

Jul 31st, 2019 12:07 AM

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover

In DuskServiceProvider.php line 43:

It is unsafe to run Dusk in production.

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

cookie

Jul 31st, 2019 06:42 AM

Hey,

First Option: If you are use "auto discovery" (since Laravel 5.5 I think), add or change this in composer.json:

"extra": {
    "laravel": {
        "dont-discover": [
            "laravel/dusk"
        ]
    }
},

and run composer dump-autoload

Second Option: Change APP_ENV to local in your .env File.

Second and last Option: Add this to the register() method in your AppServiceProvider.php

    // Run Dusk only on testing and local environment
    if ($this->app->environment('local', 'testing')) {
        $this->app->register(DuskServiceProvider::class);
    }
sinhcoms-llc

Jul 31st, 2019 09:11 PM

i was performing this on live server

cookie

Aug 1st, 2019 10:02 AM

Do you still have issues?

sinhcoms-llc

Aug 9th, 2019 01:52 PM

Best Answer

yes i have tried it but yet it gives the same error if possible please help me i will give you my cpanel details as welll

davinderkumartoun

Mar 22nd, 2021 12:41 AM

I'm getting same erros like this one "Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1"

At my Web development Company in Chandigarh we are facing some developing issuses.